<template>
    <div class="data-content" v-loading="loading">
        <div  v-for="(item, index) in entitys" :key="index">
            <div class="cx">
                <div class="title">{{item.ZSLXMC}}</div>
                <div class="pf">诚信分：{{item.Score}}分</div>
            </div>
            <el-table :data="item.zsDetial" border style="width: 100%">
                <el-table-column prop="QYMC" label="企业名称" min-width="200" >
                </el-table-column>
                <el-table-column prop="ZSBH" label="证书号" min-width="200" >
                </el-table-column>
                <el-table-column prop="YXJSRQ" label="有效期" width="200" >
                </el-table-column>
                <el-table-column prop="BFBM" label="发证机关" min-width="200" :show-overflow-tooltip="true">
                </el-table-column>
            </el-table>
        </div>
        
    </div>
</template>

<script>
export default {
    props: {
        companyName: {
            type: String,
            default: "",
        },
        projectId: {
            type: String,
            default: "",
        },
    },
    data: () => ({
        loading: false,
        entitys: [],
        pageNum: 1,
        pageSize: 10,
        total: null,
        zsDetial: []
    }),
    methods: {
        // 获取 四库一平台人员 列表13232132
        getList: function () {
            // const loading = this.$loading({
            //     lock: true,//lock的修改符--默认是false
            //     text: 'Loading',//显示在加载图标下方的加载文案
            //     spinner: 'el-icon-loading',//自定义加载图标类名
            //     background: 'rgba(0, 0, 0, 0.5)',//遮罩层颜色
            // });
            var that = this;
            this.loading = true
            this.$ajax({
                type: "get",
                url: `${this.$store.state.api.searchUrl}/searchsichuan/entezslist`,
                data: {
                    corpName: that.companyName,
                    projectId: that.projectId,
                },
                callback: function (data, res) {
                    that.loading = false
                    if(data) {
                        that.entitys = data.entitys
                        that.entitys.forEach( items => {
                            that.zsDetial = items.zsDetial
                        })
                    }
                },
                error: function (data,res) {
                    that.loading = false
                }
            });
        },
    },
    mounted() {
        this.getList();
    },
};
</script>

<style scoped lang="scss">
.data-content {
    padding:0px 15px;
    height: 700px;
    .cx{
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        .title{
            display: flex;
            line-height: 1.8;
            padding: 0px 0 0px 10px;
            position: relative;
            font-size: 15px;
            font-weight: bold;
            margin-bottom: 10px;
        }
        .title::before {
            position: absolute;
            left: 0;
            top: 50%;
            content: "";
            width: 5px;
            height: 16px;
            margin-top: -8px;
            background-color: #409eff;
        }
        .pf{
            font-size: 14px;
            font-weight: bold;
        }
    }
}
</style>
